from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE
from pptx.util import Inches
import traceback

ppt = Presentation()
# 定义图片添加的位置
left = Inches(0)
top = Inches(0)
# 定义插入图片的大小
width = Inches(5)
height = Inches(5)

for member in MSO_SHAPE.__members__:
    try:
        layout = ppt.slide_layouts[6]
        slide = ppt.slides.add_slide(layout)
        # 添加形状
        shape = slide.shapes.add_shape(member.value, left, top, width, height)
        shape.text = member.name
    except:
        # 报错后会执行的内容
        print(member.name, member.value)
 
ppt.save('show_all_shape.pptx')